<script src="/parkinfo/js/jquery-1.7.2.min.js"></script>
<script src="/parkinfo/js/jquery.min.js"></script>
<link href="/parkinfo/css/bootstrap.min.css" rel="stylesheet"/>
<link rel="stylesheet" href="/parkinfo/dist/css/AdminLTE.css">
<link rel="stylesheet" href="/parkinfo/dist/css/skins/skin-blue.min.css">
<script src="/parkinfo/angular/angular.min.js"></script>
<script src="/parkinfo/angular/angular-animate.min.js"></script>
<script src="/parkinfo/angular/angular-cookies.min.js"></script>
<script src="/parkinfo/angular/angular-ui-router.min.js"></script>
<script src="/parkinfo/angular/ocLazyLoad.min.js"></script>
<script src="/parkinfo/angular/ui-bootstrap-tpls.min.js"></script>
<script src="/park/script/monthUserOrder.js?v=1.1"></script>
<script src="/park/script/utility.js"></script>
<script src="/park/script/service/textModalService.js"></script>
<div class="<!-- content-wrapper -->" ng-app="monthUserApp" ng-controller="monthUserCtrl">
	<section class="content-header">
          <h1>
           预约用户
            <small></small>
          </h1>
       
    </section>

    <section class="content">
       <div class="row">
            <div class="col-xs-12">
              	<div class="box">	               
	             <div class="box-body"> 
					<div class="btn-group">
		                		<button #if(!$isAdmin) disabled#end  ng-click="refreshUser()" type="button" class="btn bg-purple"><span class="glyphicon glyphicon-refresh"></span> 刷新</button>
		                		<button #if(!$isAdmin) disabled#end  ng-click="insertUser()" type="button" class="btn bg-olive"><span class="glyphicon glyphicon-pencil"></span> 用户预约</button>
		                		<button #if(!$isAdmin) disabled#end  ng-click="updateUser()" type="button" class="btn bg-navy"><span class="glyphicon glyphicon-edit"></span> 修改预约</button>
		                		<button #if(!$isAdmin) disabled#end  ng-click="deleteUser()" type="button" class="btn  bg-orange"><span class="glyphicon glyphicon-remove"></span> 删除预约</button>
								<button #if(!$isAdmin) disabled#end  ng-click="updateUserPark()" type="button" class="btn  bg-olive"><span class="glyphicon glyphicon-edit"></span> 所属停车场</button>
		                	</div>	
							<div class="pull-right">
								<select class="form-control" style="padding:1px;font-size:14px;height:35px" ng-options="park.id as park.name for park in parks" ng-model="selectedParkid" ng-change="selectChanged(selectedParkid)">
	                		#if($isAdmin) <option value=-1>所有停车场</option>#end           		
	                	</select>
	                	</div>
	                    <br/>   
	                    <br/>    	
						<div>
							  <table class="table table-bordered table-hover table-condensed" style="font-size:12px">
					          
					            <tr>					            
					             <th><span style=""><input type="checkbox" /></div></th>
										<th ><span style="padding-left:15%">Id</div></th>								
										<th><span style="padding-left:15%">停车场名</div></th>
										<th><span style="padding-left:15%">卡号</div></th>
										<th><span style="padding-left:15%">车主</div></th>
										<th><span style="padding-left:15%">车牌号</div></th>
										<th><span style="padding-left:15%">车牌颜色</div></th>
										<th><span style="padding-left:15%">证件类型</div></th>	
										<th><span style="padding-left:15%">证件号码</div></th>
										<th><span style="padding-left:15%">开始时间</div></th>
										<th><span style="padding-left:15%">结束时间</div></th>	
										<th><span style="padding-left:15%">支付金额</div></th>	
										<th><span style="padding-left:15%">状态</div></th>							
					            </tr>
					          
					          <tbody id="parkBody"></tbody>
							  <tr ng-repeat="user in users">
							  <td ><input type="checkbox" ng-model="user.checked" ng-click="selectChange($index)"/></td>
							  <td ng-bind="user.id"></td>
							  <td ng-bind="user.parkname"></td>
							  <td ng-bind="user.cardnumber"></td>
							  <td ng-bind="user.owner"></td>
							  <td ng-bind="user.platenumber"></td>
							  <td ng-bind="user.platecolor"></td>
							  <td ng-bind="user.certificatetype"></td>
							  <td ng-bind="user.certificatenumber"></td>
							  <td ng-bind="user.starttime"></td>
							  <td ng-bind="user.endtime"></td>
							  <td ng-bind="user.payment | currency:'￥'"></td>
							  <td ng-if="user.status==1">已支付</td>
							  <td ng-if="user.status==0">未支付</td>
							  </tr>
					          </table>
    					</div>
    				</div>
    				<div class="box-footer clearfix">
      					<div id='pagination'></div>
      				</div>
	            </div>
            </div>
        </div>

    </section>
						





<script  type="text/ng-template" id="modifyUser">

<div class="modal-header">
    <button type='button' class='close' ng-click="close()" aria-hidden='true'>
        &times;
    </button>
    <h4 class="modal-title" >预约用户</h4>

</div>

<div class="modal-body">
    <form class="form-horizontal" role="form">
        

        <div class="form-group">
            <label class="col-sm-2 control-label" >停车场</label>
            <div class="col-sm-8">
                <select class="form-control" ng-options="park.id as park.name for park in parks" ng-model="tempUser.parkid"></select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label" >卡号</label>
            <div class="col-sm-8">
                <input type="text" class="form-control" placeholder="请输入卡号" ng-model="tempUser.cardnumber">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label" >车主</label>
            <div class="col-sm-8">
                <input type="text" class="form-control" placeholder="请输入车主姓名" ng-model="tempUser.owner">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label" >车牌号</label>
            <div class="col-sm-8">
                <input type="text" class="form-control" placeholder="请输入车牌号" ng-model="tempUser.platenumber">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label" >车牌颜色</label>
            <div class="col-sm-8">
                <input type="text" class="form-control" placeholder="请输入车牌颜色" ng-model="tempUser.platecolor">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label" >证件类型</label>
            <div class="col-sm-8">
                <input type="text" class="form-control" placeholder="请输入证件类型" ng-model="tempUser.certificatetype">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label" >证件号码</label>
            <div class="col-sm-8">
                <input type="text" class="form-control" placeholder="请输入证件号码" ng-model="tempUser.certificatenumber">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label" >开始时间</label>
            <div class="col-sm-8">
                <input type="text" class="form-control" placeholder="YYYY-MM-DD hh:mm:ss" ng-model="tempUser.starttime">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label" >结束时间</label>
            <div class="col-sm-8">
                <input type="text" class="form-control" placeholder="YYYY-MM-DD hh:mm:ss" ng-model="tempUser.endtime">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label" >支付金额</label>
            <div class="col-sm-8">
                <input type="text" class="form-control" placeholder="请输入支付金额" ng-model="tempUser.payment">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label" >状态</label>
            <div class="col-sm-8">
                <select ng-model="tempUser.status" ng-options="status.value as status.text for status in statuses" class="form-control">

                </select>
            </div>
        </div>
        <div class="alert alert-info" ng-show="(showResult || showLoader)">
            <span  ng-show='showLoader'  skip-ng-show= "yes" ng-activity-indicator= "CircledGrey"></span>
            <span ng-show='showResult'>{{result}}</span>
        </div>

    </form>
</div>

<div class="modal-footer">
    <button ng-click="close()" type="button" class="btn btn-default" data-dismiss="modal">
        取消
    </button>
    <button ng-click="submit()"  type="button" class="btn btn-primary">
        确定
    </button>
</div>
</script>
</div>